import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/pp/sys/role/list',
    method: 'get',
    params
  })
}

export function del(ids) {
  return request({
    url: '/pp/sys/role/delete',
    method: 'post',
    params: { ids }
  })
}

export function add(data) {
  return request({
    url: '/pp/sys/role/add',
    method: 'post',
    data
  })
}

export function edite(data) {
  return request({
    url: '/pp/sys/role/edite',
    method: 'post',
    data
  })
}

export function authGet(roleId) {
  return request({
    url: '/pp/sys/role/auth/get',
    method: 'get',
    params: { roleId }
  })
}

export function authUpdate(data) {
  return request({
    url: '/pp/sys/role/auth/update',
    method: 'post',
    data
  })
}
